﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ZY.EntityFrameWork.Caller;
using ZY.EntityFrameWork.Caller.Facade;
using ZY.EntityFrameWork.Core.Model.Dto;
using ZY.EntityFrameWork.Core.Model.Dto.Authority;

namespace UnitTest_EF
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            var result=CallerFactory.Instance.GetService<IArvOpService>().GetArvInLib();
            foreach (ArchiveInfoDto dto in result)
            {
                Console.WriteLine("id:" + dto.ArvID + " groupNo:" + dto.GroupNo);
            }
        }

        [TestMethod]
        public void TestMethod2()
        {
            var result = CallerFactory.Instance.GetService<IAuthorityService>().GetAllUsers();
            foreach(UserDto dto in result)
            {
                Console.WriteLine("usercode:" + dto.UserCode + " userRole:" + dto.RoleName);
            }
        }
    }
}
